// 引入 npm 模块
import dayjs from 'dayjs'

Page({
  data: {
    checked: true
  },

  fn1() {
    const time = new Date().getTime()
    console.log('time', time)
    console.log(dayjs(time).format('YYYY-MM-DD'))
  },

  onChange(e) {
    console.log('onChange', e)
    this.setData({
      checked: e.detail
    })
  }
})